Power-aware RAM processing

ABSTRACT

Logical memories and other logic functions specified in designs are mapped to power-optimized implementations using physical memories and other device resources. A logical memory may be automatically mapped to numerous potential physical implementations. Power consumption is estimated for each potential physical implementation to select the physical implementation providing the best performance with respect to power consumption and any other design constraints. Potential physical implementations can suppress clock transitions via clock enable inputs when embedded memory is not accessed. Read-enable and write-enable signals can be converted to functionally equivalent clock enable signals. Clock enable signals can be created to deactivate unused memory access ports and to deactivate embedded memory blocks during don&#39;t-care conditions. Potential physical implementations can slice logical memory into two or more embedded memory blocks to minimize power consumption.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application claims priority to U.S. Provisional Patent ApplicationNo. 60/719,251, filed Sep. 20, 2005, which is incorporated by referenceherein for all purposes.

BACKGROUND OF THE INVENTION

The present invention relates to the field of programmable devices, andthe systems and methods for programming the same. Programmable devices,such as FPGAs, typically includes thousands of programmable logic cellsthat use combinations of logic gates and/or look-up tables to perform alogic operation. Programmable devices also include a number offunctional blocks having specialized logic devices adapted to specificlogic operations, such as adders, multiply and accumulate circuits,phase-locked loops, and one or more embedded memory array blocks. Thelogic cells and functional blocks are interconnected with a configurableswitching circuit. The configurable switching circuit selectively routesconnections between the logic cells and functional blocks. Byconfiguring the combination of logic cells, functional blocks, and theswitching circuit, a programmable device can be adapted to performvirtually any type of information processing function.

Embedded memory blocks are important components in programmable devices.Embedded memory blocks allow for bulk data storage within the devicewithout the need for time-consuming off-device memory accesses. As aresult of their extensive use, memory blocks often consume a substantialpart of programmable devices' silicon area and between 10 and 20% ofcore dynamic power consumption in the average design, and a much higherproportion in some designs. Current programmable devices' embeddedmemory blocks are synchronous and primarily consume power due tointernal memory core operations activated by the clock.

Typical programmable devices include a large number of embedded memoryunits of one or more fixed sizes. Additionally, these embedded memoryunits can have fixed configurations, including input and output datawidths and memory depths, or variable configurations, including variableinput and output data widths and memory depths.

To provide flexibility for programmable device designs, many designsoftware applications enable designers to specify logical memory blocksof arbitrary size, input and output data widths, and other aspects. Thedesign software application translates the desired logical memory blockinto a configuration of one or more embedded memory blocks. Thiscorresponding configuration of embedded memory blocks, referred to as aphysical memory, includes the configuration of the data widths andinput, output, address, and control connections of each of its embeddedmemory blocks such that the behavior of the physical memory is identicalto that of the specified logical memory. The physical memory can alsoinclude logic functions, such as logic gates, multiplexers, anddemultiplexers, as needed to emulate the behavior of a specified logicalmemory. The translation of logical memories into corresponding sets ofone or more embedded memory blocks and optional associated logicfunctions is performed by a series of mapping steps.

Design software applications can enable physical memories, that is setsof one or more embedded memory blocks and optional associated logicfunctions, to implement a wide variety of designer specified logicalmemories. Additionally, other logic functions can be implemented asphysical memories, including shift registers, counters, and buffers suchas FIFOs and LIFOs. Alternatively, these other logic functions can beimplemented without embedded memory blocks by using only theprogrammable logic resources of the programmable device.

Currently, designers must optimize logical and physical memories forreduced power consumption manually. This optimization process istime-consuming and the designer must have extensive power-optimizationexperience and detailed knowledge of the underlying architecture of theprogrammable device. Additionally, this manual optimization process canbe error-prone and the designers must be careful not to violate timing,area, and other design constraints when optimizing logical and physicalmemories for reduced power consumption.

It is therefore desirable for design software applications toautomatically optimize the mapping of logical memories to physicalmemories for reduced power consumption. It is further desirable fordesign software application to optimize logic functions for reducedpower consumption using physical memories such as embedded memory blocksor programmable logic resources. It is also desirable that the designsoftware applications automatically optimize logical memories and otherlogic function for reduced power consumption without violating timing,area, or other constraints of the design.

BRIEF SUMMARY OF THE INVENTION

An embodiment of the invention maps logical memories and other logicfunctions specified in designs to power-optimized implementations usingphysical memories and other device resources. An embodiment of theinvention automatically maps a logical memory to numerous potentialphysical implementations. Power consumption is estimated for eachpotential physical implementation and an embodiment of the inventionselects the physical implementation providing the best performance withrespect to power consumption and any other design constraints. Potentialphysical implementations can suppress clock transitions via clock enableinputs when embedded memory is not accessed. Read-enable andwrite-enable signals can be converted to functionally equivalent clockenable signals. Clock enable signals can be created to deactivate unusedmemory access ports and to deactivate embedded memory blocks duringdon't-care conditions. Potential physical implementations can slicelogical memory into two or more embedded memory blocks to minimize powerconsumption.

In an embodiment, a method of mapping a logical element of a design to aphysical memory configuration includes determining at least twopotential mappings of the logical element to a physical memoryconfiguration. The power consumption of each potential mapping isevaluated and the potential mappings are ranked according to powerconsumption. One of the potential mappings having the lowest powerconsumption is selected and checked against at least one designconstraint. The selected potential mapping is packed into at least oneembedded memory block included in the physical memory configuration ifthe selected potential mapping satisfies the design constraint.Alternatively, a different one of the potential mappings is selected ifthe selected potential mapping does not satisfy the design constraint.

In an embodiment, the logical element can be a logical memory or a logicfunction converted to a logical memory. In a further embodiment, thelogic function can include a shift register, a counter, or a buffer.

In another embodiment, evaluating the power consumption of eachpotential mapping includes determining for each potential mapping anumber of embedded memory blocks; a number of active access portsassociated with each embedded memory block; and an amount of associatedlogic circuits. The associated logic circuits may include an addressdecoding logic circuit and/or an output multiplexer.

In a further embodiment, at least one potential mapping may include anaccess port of an embedded memory block deactivated using a clock enablesignal. In another embodiment, at least one potential mapping mayinclude a read enable signal of the logical element assigned to afunctionally equivalent clock enable signal of an embedded memory block.In still another embodiment, at least one potential mapping may includea write enable signal of the logical element assigned to a functionallyequivalent clock enable signal of an embedded memory block. In yetanother embodiment, at least one potential mapping may include a slicingof the logical element into a plurality of embedded memory blocks, suchthat the sum of the dynamic power consumption of the plurality ofembedded memory blocks and any associated logic circuits is minimized.

In an additional embodiment, determining at least two potential mappingsof the logical element to a physical memory configuration includesanalyzing the logical element to determine at least one poweroptimization to the physical memory configuration. The poweroptimization may include selectively disabling at least one clock enableinput of at least one embedded memory block of the physical memoryconfiguration to reduce dynamic power consumption of the physical memoryconfiguration. In a further embodiment, analyzing the logical element todetermine at least one power optimization includes determining adon't-care condition associated with an output of the logical elementand creating a don't-care signal corresponding with the don't carecondition. The don't-care signal is connected with the clock-enableinput of the embedded memory block of the physical memory configuration.

An embodiment can use memory blocks with dedicated clock enable inputsor can add logic circuits to the clock inputs of memory blocks as neededto create clock enable inputs. A further embodiment can implement theadded logic circuits using programmable device resources. An additionalembodiment can use dedicated memory blocks of the programmable devicealone or in conjunction with dual-use blocks of a device (if available)configured to operate as memory blocks.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will be described with reference to the drawings, inwhich:

FIG. 1 illustrates an example embedded memory of a programmable devicesuitable for use with the optimization techniques of embodiments of theinvention;

FIG. 2 illustrates the application of a first type of memoryoptimization suitable for use with an embodiment of the invention;

FIGS. 3A-3B illustrate applications of a second type of memoryoptimization suitable for use with an embodiment of the invention;

FIGS. 4A-4C illustrate a logical memory and corresponding physicalmemory implementations suitable for use with an embodiment of theinvention;

FIG. 5 illustrates a mapping flow for converting logical memory of adesign into physical memory implemented by the programmable deviceaccording to an embodiment of the invention;

FIG. 6 illustrates a power balancing method according to an embodimentof the invention;

FIG. 7 illustrates the phases of a typical compilation process suitablefor implementing an embodiment of the invention;

FIG. 8 illustrates a portion of an example programmable device suitablefor use with an embodiment of the invention; and

FIG. 9 illustrates a computer system suitable for implementing anembodiment of the invention.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 illustrates an example embedded memory 100 of a programmabledevice suitable for use with the optimization techniques of embodimentsof the invention. FIG. 1 illustrates a single access port for readingand writing data to embedded memory 100. Other implementations ofembedded memory 100 can have multiple access ports, similar to thatshown in FIG. 1, enabling read and/or write access to the embeddedmemory 100.

Embedded memory 100 receives a clock signal via a clock signal input 103from another portion of the programmable device. As discussed in detailbelow, the operation of the programmable device is directed by controlsignals and the clock signal. In this implementation, the clock signalinput 103 is gated with a clock enable signal provided via a clockenable input 105 to produce a memory clock signal 106. The clock enablesignal input 103 can be used to selectively deactivate the memory clocksignal 106, thereby deactivating the entire embedded memory block 100and reducing power consumption. In some embodiments, the clock enableinput 105 and associated logic gates used to selectively deactivate thememory clock signal 106 are included as dedicated logic circuits in theembedded memory block. In other embodiments, the clock enable input 105and associated logic gates are implemented outside of the embeddedmemory 100 using dedicated or programmable logic circuits of theprogrammable device.

In an embodiment, the memory clock signal 106 is provided to a bit lineprecharge unit 107. Bit line precharge unit 107 is adapted to charge oneor more pairs of bit lines to a voltage level suitable for performing aread or write operation. For clarity, FIG. 1 illustrates a single pairof bit lines, 109 and 111, a single word line 113, and a single memorycell 115. However, typical embedded memory units include a large numberof memory cells arranged in rows and columns of a memory array. Each rowof the memory array includes a word line and each column of the memoryarray includes a pair of bit lines.

The pair of bit lines 109 and 111 connect memory cell 115 with read andwrite circuits 117. Read and write circuits 117 include columnmultiplexers, write buffers, and sense amplifiers. Memory cell 115 andread and write circuits 117 can be similar to any type of memory circuitknown in the art, including static random access memory (SRAM).

The internal operation of embedded memory 100 during read and writeoperations illustrates the causes of dynamic power dissipation. In atypical memory read operation, the memory clock signal 106 is strobed,which causes the bit line precharge unit 107 to charge the bit lines 109and 111. Address input signals are decoded by an address decoder unit,not shown, to activate a word line 113, which selectively connects oneor more memory cells, such as memory cell 115, to bit lines 109 and 111.

Selected memory cell 115 introduces a voltage difference between bitlines 109 and 111 that corresponds to the state of the memory cell 115.Depending upon the type of memory technology employed, this voltagedifference between bit lines may be due to the state of the memory cellcontrolling transistors such that one of the bit lines 109 or 111 hasits voltage pulled down, due to charge stored in the memory cell 115, ordue to any other property associated with any type of memory technologyknown to one of ordinary skill in the art. This voltage differencebetween bit lines 109 and 111 is detected by the sense amplifiers withinread and write circuits 117, which in turn passes a data signalcorresponding with the state of memory cell 115 to read latch 121. Inresponse to a read enable signal received via read enable input 119,read latch 121 stores the data signal corresponding with the state ofthe memory cell 115. The contents of the read latch 121 can be accessedvia read data 123.

Similarly, in a typical memory write operation, the memory clock signal106 is strobed, which causes the bit line precharge unit 107 to chargethe bit lines 109 and 111. Address input signals are decoded by anaddress decoder unit, not shown, to activate a word line 113, whichselectively connects memory cell 115 to bit lines 109 and 111.

A write enable signal is received via write enable input 129 of pulsegenerator 131. Write data is received via write data input 125 of writedata latch 127. The pulse generator 131 facilitates the transfer ofwrite data from write data latch 127 to write buffers in read and writecircuits 117. Write data from the write buffers is then stored in theappropriate memory cells, such as memory cell 115. Typically, additionalmemory cells also connected with word line 113 and omitted for claritycan be written in parallel with memory cell 115.

For both read and write operations, a substantial portion of the totaldynamic power consumption is from the bit line precharge unit 107.Additional dynamic power is consumed by the word line decoding, memorycell access, the pulse generator 131, and the write data latch 127. Inthe embedded memory block 100, the pulse generator 131, the write datalatch 127, and the bit line precharge unit 107 are controlled by memoryclock signal 106. When the memory clock signal 106 is suppressed by theclock enable signal of clock enable input 105, these components aredeactivated and do not consume any significant dynamic power.

Thus, one approach to reducing dynamic power consumption in embeddedmemory blocks is suppress the memory clock signal 106 as often aspossible without changing the logical functions of the memory. Anembodiment of the invention automatically translates a logical memory orother logic function into a functionally equivalent configuration of oneor more physical memories, such as embedded memory blocks, andsupporting logic. To reduce power consumption, the embodiment of theinvention creates a functionally equivalent translation that suppressesthe memory clock signal 106 of one or more memory access ports for oneor more physical memories as often as possible without changing thefunction of the memory and without violating area, timing, or otherdesign constraints.

An embodiment of the invention uses a number of different algorithmicapproaches to produce a power-optimized mapping of logical memories intophysical memories. A first algorithmic approach is to disable unusedmemory access ports of physical memories used to implement a logicalmemory. FIG. 2 illustrates the application of a first type of memoryoptimization suitable for use with an embodiment of the invention.

A physical memory 200, such as an embedded memory block, can include twoor more memory access ports. For example, physical memory 200 includesmemory access ports 205 and 210. Each memory access port is capable ofaccessing a memory core 213, which includes an array of memory cellsadapted to retrieve and store data. In some implementations, thecomponents and functions of each memory access port are similar to thatdescribed with reference to FIG. 1. Other implementations of the memoryaccess ports are possible using any type of electronic or other memorydevice known to those of skill in the art.

The operation of each memory access port is directed by control signalsincluding a clock signal and a read/write enable signal. Memory accessports 205 and 210 can have separate clock signals and read/write enablesignals. For example, memory access port 205 includes a read/writeenable input 215 and a clock input 220. Similarly, memory access port210 includes a read/write enable input 225 and a clock input 230.

If a physical memory configuration does not require the use of one ormore memory access ports, an embodiment of the invention optimizes thephysical memory configuration by disabling the clock signals for unusedmemory access ports, thereby deactivating the memory access port. Forexample, memory access port 210 can be disabled by setting the clocksignal input 230 to ground.

For some types of memory blocks, the memory access port can include adedicated clock enable input. A control signal applied to the clockenable input can selectively enable or disable the clock signal providedto the memory access port. If a memory block lacks a dedicated clockenable input, this functionality can be added with the addition of alogic gate, such as an AND gate, to the clock input of the memory accessport. For programmable devices, this logic gate can be implemented usingthe programmable logic resources of the programmable device, such as alogic cell.

An embodiment of the invention can apply this type of optimization tomemory access ports of physical memories that are never used in theimplementation of a logical memory. In some other physical memoryconfigurations, a memory access port may be used occasionally in theimplementation of a logical memory. For these physical memoryconfigurations, a second algorithmic approach selectively deactivatesmemory access ports that are not in use, while allowing for read and/orwrite access as needed. FIGS. 3A-B illustrate applications of a secondtype of memory optimization according to an embodiment of the invention.

FIG. 3A illustrates an application of a memory optimization thatselectively deactivates a memory access port 300 while allowing for readaccess as needed. Typically, read access of memory access port 300 isfacilitated by a read enable signal received by a read enable input 320.Additionally, memory access port 300 receives a clock signal 310 and aread clock enable signal 305. The clock signal 310 is gated with readclock enable signal 305 to produce a memory clock signal 315. The memoryclock signal 315 is suppressed when the read clock enable signal 305 isdeasserted.

When the memory clock signal 315 is suppressed, the set of components330 of memory access port 300 will be deactivated. The set of components330 includes the bit line precharge unit, memory cells, columnmultiplexers, sense amplifiers, and read data latch. Thus, suppressingthe memory clock signal 315 using the read clock enable signal 305 cansubstantially reduce power consumption when the memory access port isunused.

In contrast, the read enable signal 320 of memory access port 300controls access to read data latch 325. If a read operation is performedwhen the read enable signal 320 is deasserted, new data will not bestored in the read data latch 325 and will be discarded. However, therewill still be substantial power consumption due to the operation of thebit line precharge unit, column multiplexers, and sense amplifiers.

To reduce power consumption, a second type of memory optimizationsubstitutes the read enable signal provided to read enable input 320with an equivalent read clock enable signal 305. This allows asubstantial portion of the components of the memory access port to bedeactivated when the read enable signal is deasserted. To facilitate thedetermination of when a read clock enable signal is equivalent to theread enable signal, Table 1 illustrates the operation of the memoryaccess port 300 in response to the read enable signal 320 and the readclock enable signal 305.

TABLE 1 Memory Access Port Behavior in Response to Read Enable and ReadClock Enable Read Clock Read Enable Enable Memory Access Port Behavior 00 Read data latch closed; Memory access port disabled 1 0 Read datalatch closed; Memory access port enabled 0 1 Read data latch open;Memory access port disabled 1 1 Read data latch open; Memory access portenabled; Read occurs

As can be seen from Table 1, the memory access port successfully readsdata only when the logical AND of the read clock enable signal and theread enable is true. Thus, the read enable input 320 can be set to alogical 1 and the read enable signal can connected with the read clockenable input 305. This configuration will be functionally equivalent tothe expected operation of the memory access port 300 in response to theread enable signal with the additional advantage of reduced powerconsumption due to the suppression of the memory clock signal 315 whenthe read enable signal is deasserted.

Similarly, FIG. 3B illustrates an application of a memory optimizationthat selectively deactivates a memory access port 350 while allowing forwrite access as needed.

Typically, write access of memory access port 350 is facilitated by awrite enable signal received by a write enable input 370. Additionally,memory access port 350 receives a clock signal 360 and a write clockenable signal 355. The write clock enable signal 355 is gated with theclock signal 360 to produce a memory clock signal 365. The memory clocksignal 365 is suppressed when the write clock enable signal 355 isdeasserted.

When the memory clock signal 365 is suppressed, the bit line prechargeunit 375; memory cells 376; column multiplexers, write buffers, andsense amplifiers 381; row and column decoders 377 and 379; pulsegenerator 383; and write data latch 385 will all be deactivated. Thus,suppressing the memory clock signal 365 using the write clock enablesignal 355 can substantially reduce power consumption when the memoryaccess port is unused.

In contrast, the write enable signal input 370 of memory access port 350controls the pulse generator 383. However, the write enable signal input370 does not deactivate components such as the bit line precharge unit375; row and column decoders 377 and 379; and the write data latch 385.Thus, the memory access port 350 will still consume substantial amountsof power even when the write enable signal input 370 is deasserted.

To reduce power consumption, a second type of memory optimizationsubstitutes the write enable signal provided to write enable input 370with an equivalent write clock enable signal 355. This allows asubstantial portion of the components of the memory access port to bedeactivated when the write enable signal is deasserted. To facilitatethe determination of when a write clock enable signal is equivalent tothe write enable signal, Table 2 illustrates the operation of the memoryaccess port 350 in response to the write enable signal input 370 and thewrite clock enable signal 355.

TABLE 2 Memory Access Port Behavior in Response to Write Enable andWrite Clock Enable Write Clock Write Enable Enable Memory Access PortBehavior 0 0 Pulse generator deactivated; Memory access port disabled 10 Pulse generator deactivated; Memory access port enabled 0 1 Pulsegenerator activated; Memory access port disabled 1 1 Pulse generatoractivated; Memory access port enabled; Write occurs

As can be seen from Table 2, the memory access port 350 successfullywrites data only when the logical AND of the write clock enable signaland the write enable is true. Thus, the write enable input 370 can beset to a logical 1 and the write enable signal can be connected with thewrite clock enable input 355. This configuration will be functionallyequivalent to the expected operation of the memory access port 350 inresponse to the write enable signal with the additional advantage ofreduced power consumption due to the suppression of the memory clocksignal 365 when the write enable signal is deasserted.

In some applications, memory access ports of a physical memory oftensupport simultaneous and independent read and write operations. If thememory access ports include independent clock signals and clock enableinputs, the approaches of FIGS. 3A and 3B can be easily combined. Ifthere is only a single clock signal, additional logic elements withinthe physical memory or located elsewhere in the programmable device canbe used to logically split the clock signal into two clock signals, onefor each memory access port. The above approaches can then be applied tothe separate clock signals of each memory port.

In further applications, a user design may already specify the functionof the clock enable signal for a memory access port. In theseapplications, an AND logic gate can be used to combine the read and/orwrite enable signal with the user-specified clock enable signal. Thecombined clock enable signal is connected with the memory access portclock enable signal as discussed above. Embodiments of the inventionconsider timing, area, and other effects when adding additional logic toa physical memory implementation of a logical memory to ensure thatdesign constraints are not violated.

In some applications, the logical memory specified by a design is largerthan the capacity of a single physical memory of the programmabledevice. As discussed above, embodiments of the invention mayautomatically translate a logical memory or other logic function into afunctionally equivalent configuration of multiple physical memories andsupporting logic. A third optimization approach reduces powerconsumption for configurations of multiple physical memories by allowingat least one physical memory to remain inactive during memory accesses.

FIGS. 4A-4C illustrate a logical memory and corresponding physicalmemory implementations suitable for use with an embodiment of theinvention. FIG. 4A illustrates an example logical memory 400. Logicalmemory 400 is specified to have an arbitrary width of N bits and anarbitrary depth of M words, wherein each word is a group of N bits.

FIG. 4B illustrates a first physical memory 405 implementing the logicalmemory 400. Physical memory 405 includes a set of N memory blocks 410,such as memory blocks 412, 414, 416, and 418. Each of the N memoryblocks has a data width of 1 and a depth of at least M. Thus, physicalmemory 405 includes a total of M×N bits, as specified by logical memory400. Physical memory 405 is sometimes referred to as a vertical memoryslicing configuration.

A set of address lines 420 are connected in parallel to each memoryblock in set 410. Each memory block of set 410 includes a 1-bit output,such as outputs 413, 415, 417, and 419. When physical memory 405 isaccessed, each of the memory blocks outputs one of the bits of a N-bitmemory word. Although physical memory 405 does not require anysupporting logic, which reduces area and timing requirements, eachmemory block in set 410 must be active during every memory access. Thus,physical memory 405 consumes a substantial amount of power.

FIG. 4C illustrates a second physical memory 450 implementing thelogical memory 400. Physical memory 450 includes a set of M memoryblocks 455, such as memory blocks 457, 459, 461, and 463. Each memoryblock of set 455 has a data width of N and a depth of at least 1. Inthis example, each memory block has a depth of M/N, giving each memoryblock a capacity of M bits. Thus, physical memory 450 includes a totalof M×N bits, as specified by logical memory 400. Physical memory 450 issometimes referred to as a horizontal memory slicing configuration.

A set of address lines 465 are connected with address decoding logic470. Address decoding logic 470 is connected with each of the memoryblocks of set 455. Address decoding logic 470 is adapted to selectivelyactivate one of the set of memory blocks 455 in response to a memoryaddress. Each of the memory blocks of set 455 includes a N-bit dataoutput, such as data outputs 458, 460, 462, and 464. The data outputsare connected with output multiplexer 475. Output multiplexer 475 iscontrolled by address decoding logic 470 and adapted to selectivelyconnect one of the N-bit memory block data outputs to an N-bit physicalmemory data output 480.

When physical memory 450 is accessed, the address decoding logic 470selectively activates one of the memory blocks of set 455. The remainingmemory blocks in set 455 are not used and may be deactivated to conservepower. Memory blocks may be deactivated by suppressing the memory clocksignal using read or write enable signals, as described above. Physicalmemory 450 consumes substantially less power than physical memory 405.However, the addition of address decoding logic 470 and multiplexer 475increases the timing and area requirements. Additionally, addressdecoding logic 470 and multiplexer 475 consume some power as well.

Physical memories 405 and 450 represent two end points in a range ofphysical memory configurations corresponding with logical memory 400.For example, each of the memory blocks in physical memory 405 can beincreased in width, thereby reducing the total number of memory blocksthat are active simultaneously. Similarly, the depth of each memoryblock in physical memory 450 can be increased, reducing the complexityof address decoding logic 470 and multiplexer 475, and in some casesreducing the total number of memory blocks in set 455 as well. For manyapplications, an intermediate physical memory configuration,incorporating some aspects of physical memories 405 and 450 will beoptimal for power consumption, area, and timing constraints.

The power optimization approaches discussed above can be applied aloneor together to determine a power optimized physical memoryimplementation of a logical memory. FIGS. 5 and 6 illustrate a mappingflow and power balancing method suitable for determining a physicalmemory implementation of a logical memory that is optimized for powerconsumption, timing, and area according to an embodiment of theinvention. The mapping flow and power balancing method can utilize theabove discussed optimizations as well as other power, timing, or areaoptimizations known in the art.

FIG. 5 illustrates a mapping flow 500 for converting logical memory andlogic functions of a design into physical memory implemented by theprogrammable device according to an embodiment of the invention. Mappingflow 500 receives logic functions 505, such as RAM buffers, includingFIFOs and LIFOs; shift registers, and other logic functions that can beimplemented, at least in part, using physical memories. Phase 510converts the logic functions 505 into equivalent logical memories andassociated logic circuits, which can be implemented using programmabledevice resources.

Phase 520 may receive logical memory specifications corresponding withlogic functions 505 from phase 510. Phase 520 may also receivespecifications for logical memories 515 that are specified explicitly inthe design.

Phase 520 converts logical memories into one or more physical memoryconfigurations. For each logical memory specification, phase 520determines one or more corresponding physical memory configurations. Aprogrammable device can include memory blocks of numerous differentsizes, bit widths, and depths. Some programmable devices can alsoinclude memory blocks that can be configured to several bit widths anddepths. Some programmable devices can also include dual-use blocks.Dual-use blocks can be configured to implement either logic functions,thereby acting like a logic cell or group of logic cells, or memoryfunctions, thereby acting like a memory block. Thus, embodiments of theinvention can consider dual-use blocks as a type of memory block. In anembodiment, phase 520 determines a set of physical memoriescorresponding with the logical memories of the design that is capable ofbeing implemented by the programmable device.

Phase 525 evaluates the power consumption of the physical memoryconfigurations provided by phase 520 and selects the optimalconfiguration in view of timing, area, and other design constraints.FIG. 6 illustrates a power optimization method 600 that satisfies designconstraints on timing and area according to an embodiment of theinvention.

Step 605 determines the number of embedded memory blocks required foreach physical memory configuration with the selected memory block type.Step 605 also determines the size of the address decoding logic andmultiplexer required to support each physical memory configuration. Inan embodiment, step 605 determines these attributes for each possiblememory block width and depth supported by the memory block types.

Step 610 determines the total dynamic power consumption for eachphysical memory configuration. Step 610 determines the dynamic powerconsumption of the memory block(s) in the appropriate bit width anddepth configuration. Step 610 then scales this power consumption by thetotal number of active memory blocks of each type during each memoryaccess. Step 610 also determines the dynamic power consumption ofsupporting logic, such as address decoding logic and multiplexers. In anembodiment, step 610 determines the dynamic power consumption of asingle bit of the output multiplexer, if any is present in the physicalmemory configuration, and scales this amount by the total number ofmultiplexer bits required. Step 610 also determines the dynamic powerconsumption of the address decoding logic, if any is present in thephysical memory configuration. In an embodiment, this calculation isrepeated for each active memory access port in the physical memoryconfiguration.

Step 610 sums the dynamic power consumption from active memory blocksand supporting logic from each active memory port to determine the totaldynamic power consumption of a physical memory configuration. Step 610is repeated for each physical memory configuration. In a furtherembodiment, if the physical memory corresponds with a logical memoryused to implement a logic function, such as a shift register, counter,or buffer, step 610 also includes the power consumption from anyadditional supporting logic in the total dynamic power consumption. Thephysical memory configurations and their respective dynamic powerconsumption values are stored in a list of potentially feasibleimplementations of the logical memory.

Step 615 ranks the physical memory configurations according to theirrespective dynamic power consumptions and selects the physical memoryconfiguration with the lowest power consumption.

Step 620 evaluates the feasibility of the selected physical memoryconfiguration. In an embodiment, step 620 determines if the selectedphysical memory configuration does not require more memory blocks thanavailable in the programmable device. The amount of memory blocks ofeach type available in the programmable device is limited, at the least,by the architecture of the programmable device. This amount may befurther limited by memory blocks already allocated to implement otherportions of the design, such as other logical memories or logicfunctions. For programmable devices with dual-use blocks, some or all ofthe dual-use blocks may also be required to implement logic functions,and be unavailable for use as memory blocks. Finally, user floorplanconstraints may restrict some logical memories to portions of thedevice, and consequently the physical memory configurations used toimplement these logical memories must not use more memory blocks of eachtype than are available in the appropriate portion of the device.

In a further embodiment of step 620, timing analysis information, iftiming analysis has already been performed, or timing estimateinformation can be used to determine whether the selected physicalmemory configuration violates any timing constraints. Similarly, anembodiment of step 620 can use synthesis information or estimates todetermine whether the selected physical memory configuration, and inparticular its associated logic, violates any area or logic elementusage constraints.

If step 620 determines the selected physical memory configuration is notfeasible due to memory block usage, timing constraints, areaconstraints, or any other factor, step 625 removes the selected physicalmemory configuration from the list of potentially feasibleimplementations. Method 600 then returns to step 615 and 620 to selectand evaluate another physical memory configuration.

In contrast, if step 620 determines that the selected physical memoryconfiguration is feasible, the selected physical memory configuration isstored for further processing. In an embodiment, method 600 is repeatedfor each logical memory in the design, so that a power optimized andfeasible physical memory configuration is chosen for each logicalmemory.

Returning to flow 500, phase 525 outputs a set of power-optimizedphysical memory configurations corresponding with the logical memories.Following the optimization of the physical memories in phase 525, phase530 prepares the optimized physical memories for implementation by theprogrammable device. For example, phase 530 may add and configure themultiplexers, address decoding logic and clock enable generation logicas needed for each optimized physical memory configuration.

In some applications, there may be interactions between the physicalmapping of various logical memories. For example, a power-optimizedphysical mapping of a first logical memory in a design may make aphysical mapping of a second logical memory infeasible due to thelimitations of the programmable device, such as the number of availablephysical memory blocks or timing and routing constraints.

To deal with these interactions, an embodiment sorts logical memories bytheir expected power consumption and phase 525 determines physicalmappings for the highest power logical memories first. This providesgreater implementation flexibility for the logical memories expected torequire the most power.

A further embodiment can iterate through phases 520 and 525 severaltimes, with any logical memory that had no feasible physical memoryconfiguration in a previous iteration moved to the front of the list oflogical memories to process in later iterations. Successive iterationsof phase 520 may determine alternative physical memory implementationsof one or more of the logical memories in an attempt to create afeasible and power-optimized set of physical memories.

FIG. 7 illustrates the phases of a typical compilation process 700suitable for implementing an embodiment of the invention. Thecompilation process 700 converts a user design into a programmabledevice configuration adapted to configure a programmable device toimplement the user design. The extraction phase 705 converts adescription of the user design, expressed for example in a hardwaredescription language, into a register transfer level description.

Synthesis phase 710 converts the register transfer layer description ofthe user design into a set of logic gates. Technology mapping phase 715subdivides the set of logic gates into a set of atoms, which are groupsof logic gates matching the capabilities of the logic cells or otherfunctional blocks of the programmable device. A given user design may beconverted into any number of different sets of atoms, depending upon theunderlying hardware of the programmable device used to implement theuser design.

Following the technology mapping phase 715, the cluster phase 720 groupsrelated atoms together into clusters. The place phase 725 assignsclusters of atoms to locations on the programmable device. The routephase 730 determines the configuration of the configurable switchingcircuit of the programmable device used to connect the atomsimplementing the user design.

The delay annotator phase 735 determines the signal delays for the setof atoms and their associated connections in the configurable switchingcircuit using a timing model of the programmable device. The timinganalysis phase 740 determines the maximum operating speed of theprogrammable device when implementing the user design, for example bydetermining the portions of the user design have the largest signaldelay.

The assembler phase 745 generates a set of configuration informationspecifying the configuration of the programmable device implementing theuser design, including the configuration of each of the logic cells usedto implement the user design and the configuration of the configurableswitching circuit used to connect the logic cells. The assembler phase745 can write the configuration information to a configuration file,which can then be used to configure one or more programmable devices toimplement instances of the user design.

In an embodiment, the mapping flow 500 and method 600 are integratedinto compilation process 700. In a some embodiments, the mapping flow500 and method 600 are performed early in the compilation process 700,such as in conjunction with the synthesis 710 or technology mappingphase 715. As a result, the mapping flow 500 and method 600 may have torely on estimated timing and area information. In some circumstances,this estimated information may not be accurate and the timing or areaconstraints of a design may be exceeded by the power-optimized physicalmemory configurations selected earlier in the compilation process.

An embodiment of the invention addresses this possibility by adding aniteration loop to compilation process 700. When a timing or areaconstraint is violated by a path in the design that includes apower-optimized physical memory configuration, an embodiment of thecompilation process checks on the amount of logic cells or otherprogrammable device resources and/or the amount of timing delay that wasadded by the power optimization of the physical memory configuration. Ina further embodiment, this information is determined at the time thepower-optimization is performed and stored for later reference. If theamount of logic cells or timing delay introduced by the poweroptimization contributes substantially to the path's constraintviolations, an embodiment of the compilation process 700 repeats all ora portion of the phases of the compilation process 700 with poweroptimization disabled for the offending physical memory configuration.

FIG. 8 illustrates a portion of an example programmable device 800suitable for use with an embodiment of the invention. Programmabledevice 800 includes a number of logic array blocks (LABs), such as LABs805, 810, 815. Each LAB includes a number of programmable logic cellsusing logic gates and/or look-up tables to perform a logic operation.LAB 805 illustrates in detail logic cells 820, 821, 822, 823, 824, 825,826, and 827. Logic cells are omitted from other LABs in FIG. 8 forclarity. The LABs of device 800 are arranged into rows 830, 835, 840,845, and 850.

In an embodiment, the arrangement of logic cells within a LAB and ofLABs within rows provides a hierarchical system of configurableconnections, in which connections between logic cells within a LAB,between cells in different LABs in the same row, and between cell inLABs in different rows require progressively more resources and operateless efficiently. In some programmable devices, such as fieldprogrammable gate arrays (FPGAs), the configurable connections areimplemented with a configurable switching circuit capable of routingsignals between any arbitrary portions of the programmable device inaccordance with configuration data. The operation of the configurableswitching circuit can be specified at any time by loading a programmabledevice configuration into the programmable device. In other programmabledevices, such as structured ASICs, the configurable connections arespecified during manufacturing according to the configuration dataproduced by a compilation process 700.

In addition to logic cells arranged in LABs, programmable device 800also include specialized functional blocks, such as multiply andaccumulate block (MAC) 855 and random access memory block (RAM) 860. Forclarity, the portion of the programmable device 800 shown in FIG. 8 onlyincludes a small number of logic cells, LABs, and functional blocks.Typical programmable devices will include thousands or tens of thousandsof these elements.

FIG. 9 illustrates a computer system 1000 suitable for implementing anembodiment of the invention. Computer system 1000 typically includes amonitor 1100, computer 1200, a keyboard 1300, a user input device 1400,and a network interface 1500. User input device 1400 includes a computermouse, a trackball, a track pad, graphics tablet, touch screen, and/orother wired or wireless input devices that allow a user to create orselect graphics, objects, icons, and/or text appearing on the monitor1100. Embodiments of network interface 1500 typically provides wired orwireless communication with an electronic communications network, suchas a local area network, a wide area network, for example the Internet,and/or virtual networks, for example a virtual private network (VPN).

Computer 1200 typically includes components such as one or more generalpurpose processors 1600, and memory storage devices, such as a randomaccess memory (RAM) 1700, disk drives 1800, and system bus 1900interconnecting the above components. RAM 1700 and disk drive 1800 areexamples of tangible media for storage of data, audio/video files,computer programs, applet interpreters or compilers, virtual machines,and embodiments of the herein described invention. Further embodimentsof computer 1200 can include specialized input, output, andcommunications subsystems for configuring, operating, testing, andcommunicating with programmable devices. Other types of tangible mediainclude floppy disks; removable hard disks; optical storage media suchas DVD-ROM, CD-ROM, and bar codes; non-volatile memory devices such asflash memories; read-only-memories (ROMS); battery-backed volatilememories; and networked storage devices.

Further embodiments can be envisioned to one of ordinary skill in theart after reading the attached documents. For example, although theinvention has been discussed with reference to programmable devices, itis equally applicable to logic minimization applications used to designany type of digital device, such as standard or structured ASICs, gatearrays, general digital logic devices, as well as digital logic devicesimplemented with advanced process technologies such as silicon nanowiresor carbon nanotubes. In other embodiments, combinations orsub-combinations of the above disclosed invention can be advantageouslymade. The block diagrams of the architecture and flow charts are groupedfor ease of understanding. However it should be understood thatcombinations of blocks, additions of new blocks, re-arrangement ofblocks, and the like are contemplated in alternative embodiments of thepresent invention.

The specification and drawings are, accordingly, to be regarded in anillustrative rather than a restrictive sense. It will, however, beevident that various modifications and changes may be made thereuntowithout departing from the broader spirit and scope of the invention asset forth in the claims.

1. A method of mapping a logical element of an integrated circuit designto a physical memory configuration, the method comprising: determiningat least two potential mappings of the logical element of the integratedcircuit design to the physical memory configuration; evaluating a powerconsumption of each potential mapping; ranking the potential mappingsaccording to power consumption; selecting one of the potential mappingshaving a lowest power consumption; checking the selected potentialmapping against at least one design constraint; assigning the selectedpotential mapping to at least one embedded memory block included in thephysical memory configuration in response to a determination that theselected potential mapping satisfies the design constraint; andselecting a different one of the potential mappings in response to adetermination that the selected potential mapping does not satisfy thedesign constraint, wherein evaluating the power consumption of eachpotential mapping includes determining for each potential mapping anumber of embedded memory blocks; a number of active access portsassociated with each embedded memory block; and an amount of associatedlogic circuits.
 2. The method of claim 1, wherein the logical element isa logical memory.
 3. The method of claim 1, wherein the logical elementis a logic function converted to a logical memory.
 4. The method ofclaim 3, wherein the logic function includes a shift register.
 5. Themethod of claim 3, wherein the logic function includes a counter.
 6. Themethod of claim 3, wherein the logic function includes a buffer.
 7. Themethod of claim 1, wherein the associated logic circuits includes anaddress decoding logic circuit.
 8. The method of claim 1, wherein theassociated logic circuits include an output multiplexer.
 9. The methodof claim 1, wherein at least one potential mapping includes an accessport of an embedded memory block deactivated using a clock enablesignal.
 10. The method of claim 9, wherein the potential mappingincludes a logic circuit connected with a clock input of the access portof the embedded memory block, wherein the logic circuit adds a clockenable input to the access port of the embedded memory block.
 11. Themethod of claim 1, wherein at least one potential mapping includes aread enable signal of the logical element assigned to a functionallyequivalent clock enable signal of an embedded memory block.
 12. Themethod of claim 1, wherein at least one potential mapping includes awrite enable signal of the logical element assigned to a functionallyequivalent clock enable signal of an embedded memory block.
 13. Themethod of claim 1, wherein at least one potential mapping includes aslicing of the logical element into a plurality of embedded memoryblocks, such that the sum of the dynamic power consumption of theplurality of embedded memory blocks and any associated logic circuits isminimized.
 14. The method of claim 1, wherein determining at least twopotential mappings of the logical element to a physical memoryconfiguration comprises: analyzing the logical element to determine atleast one power optimization to the physical memory configuration,wherein the power optimization includes selectively disabling at leastone clock enable input of at least one embedded memory block of thephysical memory configuration to reduce dynamic power consumption of thephysical memory configuration.
 15. The method of claim 14, whereinanalyzing the logical element to determine at least one poweroptimization comprises: determining a don't-care condition associatedwith an output of the logical element; creating a don't-care signalcorresponding with the don't care condition; and connecting an inverseof the don't-care signal with the clock-enable input of the embeddedmemory block of the physical memory configuration.
 16. The method ofclaim 1, wherein the embedded memory block included in the physicalimplementation is a dual-use block configured to operate as a memory.17. A method of mapping a logical element of an integrated circuitdesign to a physical memory configuration, the method comprising:receiving the integrated circuit design including the logical element;extracting a logical memory from the logical element; analyzing thelogical memory to determine at least one power optimization; and mappingthe logical memory to the physical memory configuration, wherein thephysical memory configuration includes at least one embedded memoryblock, and wherein the physical memory configuration includes the poweroptimization, wherein analyzing the logical memory to determine at leastone power optimization comprises: determining a don't-care conditionassociated with an output of the logical memory; and creating adon't-care signal corresponding with the don't care condition; andconnecting an inverse of the don't-care signal with a clock-enable inputof the embedded memory block.
 18. The method of claim 17, wherein thepower optimization includes selectively disabling at least one clockinput of the embedded memory block of the physical memory configurationvia the clock enable input to reduce dynamic power consumption of thephysical memory configuration.
 19. The method of claim 18, wherein thephysical memory configuration includes a logic circuit connected withthe clock input of the embedded memory block, wherein the logic circuitadds the clock enable input to the embedded memory block.
 20. The methodof claim 18, wherein the power optimization includes converting a readenable signal applied to a read enable input of the logical memory intoa functionally equivalent input signal applied to the clock enable inputof the embedded memory block of the physical memory configuration. 21.The method of claim 18, wherein the power optimization includesconverting a write enable signal applied to a write enable input of thelogical memory into a functionally equivalent input signal applied tothe clock enable input of the embedded memory block of the physicalmemory configuration.
 22. The method of claim 18, wherein the physicalmemory configuration includes an unused memory access port for theembedded memory block and the power optimization includes connecting adeactivation signal with the clock enable input of the embedded memoryblock so as to deactivate the unused memory access port.
 23. The methodof claim 17, wherein the power optimization includes determining aslicing of the logical memory into a plurality of embedded memoryblocks, such that the sum of the dynamic power consumption of theplurality of embedded memory blocks and any associated logic circuits isminimized.
 24. The method of claim 17, wherein the logical element is alogical memory specified by the design.
 25. The method of claim 24,wherein the logic function includes a shift register.
 26. The method ofclaim 24, wherein the logic function includes a counter.
 27. The methodof claim 24, wherein the logic function includes a buffer.
 28. Themethod of claim 17, wherein the logical element is a logic function. 29.The method of claim 17, wherein the embedded memory block included inthe physical implementation is a dual-use block configured to operate asa memory.
 30. A method of mapping a logical element in an integratedcircuit design to an integrated circuit physical memory, the methodcomprising: determining at least two potential mappings of the logicalelement to the integrated circuit physical memory; evaluating a powerconsumption of each potential mapping; ranking the potential mappingsaccording to power consumption; selecting the potential mapping having alowest power consumption; determining if the selected mapping satisfiesa design constraint; selecting a different one of the potential mappingsin response to a determination that the selected potential mapping doesnot satisfy the design constraint; and assigning the selected potentialmapping to the integrated circuit physical memory in response to adetermination that the selected potential mapping does satisfy thedesign constraint, wherein evaluating the power consumption of eachpotential mapping includes determining for each potential mapping anumber of embedded memory blocks; a number of active access portsassociated with each embedded memory block; and an amount of associatedlogic circuits.
 31. The method of claim 30 wherein the design constraintcomprises a timing for a signal.
 32. The method of claim 30 wherein thedesign constraint comprises usage of the integrated circuit physicalmemory.
 33. The method of claim 30 wherein the design constraintcomprises die area used by the mapping.
 34. The method of claim 30wherein the logical element in the integrated circuit design comprises afirst-in-first-out memory.
 35. The method of claim 30 wherein thelogical element in the integrated circuit design comprises a shiftregister.
 36. The method of claim 30 wherein determining at least twopotential mappings of the logical element to the integrated circuitphysical memory comprises deactivating an access port of a memory blockusing a clock enable signal.
 37. The method of claim 30 whereindetermining at least two potential mappings of the logical element tothe integrated circuit physical memory comprises connecting adeactivation signal to a clock enable input of the physical memory. 38.The method of claim 30 wherein determining at least two potentialmappings of the logical element to the integrated circuit physicalmemory comprises slicing the logical element into a plurality of memoryblocks.
 39. A method of mapping a logical memory in an integratedcircuit design to an integrated circuit physical memory, the methodcomprising: analyzing the logical memory to determine at least one poweroptimization; determining a mapping of the logical memory to theintegrated circuit physical memory, the mapping including the poweroptimization; and mapping the logical memory to the integrated circuitphysical memory, wherein analyzing the logical memory to determine atleast one power optimization comprises: determining a don't-carecondition associated with an output of the logical memory; and creatinga don't-care signal corresponding with the don't care condition; andconnecting an inverse of the don't-care signal with a clock-enable inputof an embedded memory block.
 40. The method of claim 39 wherein thepower optimization comprises deactivating an access port of a memoryblock using a clock enable signal.
 41. The method of claim 39 whereinthe power optimization comprises connecting a deactivation signal to aclock enable input of the physical memory.
 42. The method of claim 39wherein the power optimization comprises slicing the logical elementinto a plurality of memory blocks.